<template>
  <a :class="[disable?'addbutton-a-disable':'','addbutton-a']" @click="buttonEvent">{{title}}</a>
</template>
<style scoped>
.addbutton-a {
  background-color: #409eff;
  color: #ffffff;
  /* min-width: 60px; */
  height: 28px;
  line-height: 28px;
  font-size: 12px;
  /* border: 1px solid #18ceb4; */
  text-align: center;
  cursor: pointer;
  margin: 5px;
  border-radius: 3px;
  padding: 0px 14px;
}
.addbutton-a-disable {
  cursor: not-allowed;
  background-color: #e6e6e6;
  /* border: 1px solid #e6e6e6; */
}
</style>
<script>
//确认按钮
export default {
  name: "addButton",
  props: {
    disable: {
      default: false,
    },
    title: {
      default: "确定",
    },
  },
  meta: {
    descr: "添加按钮",
  },
  methods: {
    buttonEvent: function () {
      var that = this;
      if (!that.disable) {
        that.$emit("click");
      }
    },
  },
};
</script>

